/*
 Xern Entity Relocation Network
 Copyright (C) 2011 Ronie Salgado <roniesalg@gmail.com>

 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
 License as published by the Free Software Foundation; either
 version 2.1 of the License, or (at your option) any later version.

 This library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 Lesser General Public License for more details.

 You should have received a copy of the GNU Lesser General Public
 License along with this library; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
*/

#ifndef XERN_OGRE_LOADER_HPP
#define XERN_OGRE_LOADER_HPP

#include "Xern/IResourceLoader.hpp"

namespace XernOgre
{
	// Ogre resource loader
	class OgreRenderer;
	class OgreLoader: public IResourceLoader
	{
	public:
		OgreLoader(boost::shared_ptr<OgreRenderer> renderer);
		~OgreLoader();

		virtual bool CanLoadResource(const std::string &filename, const std::string &group) const;
		virtual bool CanLoadResource(const std::string &mime) const;
		virtual boost::shared_ptr<IResource>
		LoadResource(const std::string &filename, const std::string &group, const std::string &path) const;
		virtual boost::shared_ptr<IResource>
		LoadResource(const std::string &mime, boost::shared_ptr<IDataFilter> data) const;

	private:
		boost::shared_ptr<OgreRenderer> renderer;
	};
}; // namespace XernOgre

#endif //XERN_OGRE_LOADER_HPP
